import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class PaymentEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ comment: '订单ID' })
  orderId: number;

  @Column({ comment: '支付方式：1-微信，2-支付宝' })
  type: number;

  @Column({ comment: '支付金额' })
  amount: number;

  @Column({
    comment: '支付时间',
    default: () => 'CURRENT_TIMESTAMP',
    type: 'timestamp',
  })
  payTime: Date;
}
